public class Teacher extends Person{
    public int getSeniority() {
        return seniority;
    }

    public void setSeniority(int seniority) {
        this.seniority = seniority;
    }

    private int seniority;

    @Override
    public void print() {
        System.out.println("姓名:"+super.getName()+"\t"+"年龄:"+super.getAge()+"\t"+"教龄:"+this.seniority);
    }


    public static void main(String[] args) {
        Teacher t=new Teacher();
        t.setName("苍老师");
        t.setAge(30);
        t.setSeniority(5);
        t.print();
    }
}
